/*
    配置文件模块 -- 单例类
*/

#ifndef __M_CONFIG_H__
#define __M_CONFIG_H__
#include<iostream>
#include<string>
#include<mutex>
namespace Hxy_Cloud
{
    class Config
    {
        public:
            static Config Getinstance();
            int GetHotTime();
            int GetSvrPort();
            std::string GetDownloadPer();
            std::string GetPackFileSuf();
            std::string GetBackDir();
            std::string GetPackDir();
            std::string GetSvrIp();
            std::string GetBackupFile();
            void operator=(const Config& conf) = delete;
            Config(const Config& conf) = delete;
        private:
            std::mutex _mtx;
            Config(){}
            static Config* _conf;
        private:
            int _hot_time; //热点判断时间
            int _server_port; //服务器端口号
            std::string _download_perfix; //文件下载路径前缀
            std::string _packfile_suffix; //压缩包后缀
            std::string _back_dir; // 备份文件存放目录
            std::string _pack_dir; //压缩包存放目录
            std::string _server_ip; // 服务端ip地址
            std::string _backup_file; //数据信息存放文件
    };

}

#endif